From 06598c50f43bc3c9cbf5fbf55436632b145ed048 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 20 Nov 2013 08:30:14 +0000 Subject: [PATCH] phy/marvell: disable 4-port phys The Marvell PHY was originally disabled because it can cause networking failures on some systems. According to Lennert Buytenhek this is because some of the variants added did not share the same register layout. Since the known cases are all 4-ports disable those variants (indicated by a 4 in the penultimate position of the model name) until they can be audited for correctness. [bwh: Also #if-out the init functions for these PHYs to avoid compiler warnings] Gbp-Pq: Topic bugfix/all Gbp-Pq: Name disable-some-marvell-phys.patch --- drivers/net/phy/marvell.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 57297ba2398..7d8d3b8f9c2 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -927,6 +927,7 @@ static int m88e1118_config_init(struct phy_device *phydev) return phy_write(phydev, MII_BMCR, BMCR_RESET); } +#if 0 static int m88e1149_config_init(struct phy_device *phydev) { int err; @@ -952,7 +953,9 @@ static int m88e1149_config_init(struct phy_device *phydev) return phy_write(phydev, MII_BMCR, BMCR_RESET); } +#endif +#if 0 static int m88e1145_config_init(struct phy_device *phydev) { int err; @@ -1033,6 +1036,7 @@ static int m88e1145_config_init(struct phy_device *phydev) return 0; } +#endif /** * fiber_lpa_to_ethtool_lpa_t @@ -2002,6 +2006,7 @@ static struct phy_driver marvell_drivers[] = { .get_strings = marvell_get_strings, .get_stats = marvell_get_stats, }, +#if 0 { .phy_id = MARVELL_PHY_ID_88E1145, .phy_id_mask = MARVELL_PHY_ID_MASK, @@ -2020,6 +2025,8 @@ static struct phy_driver marvell_drivers[] = { .get_strings = marvell_get_strings, .get_stats = marvell_get_stats, }, +#endif +#if 0 { .phy_id = MARVELL_PHY_ID_88E1149R, .phy_id_mask = MARVELL_PHY_ID_MASK, @@ -2038,6 +2045,8 @@ static struct phy_driver marvell_drivers[] = { .get_strings = marvell_get_strings, .get_stats = marvell_get_stats, }, +#endif +#if 0 { .phy_id = MARVELL_PHY_ID_88E1240, .phy_id_mask = MARVELL_PHY_ID_MASK, @@ -2056,6 +2065,7 @@ static struct phy_driver marvell_drivers[] = { .get_strings = marvell_get_strings, .get_stats = marvell_get_stats, }, +#endif { .phy_id = MARVELL_PHY_ID_88E1116R, .phy_id_mask = MARVELL_PHY_ID_MASK, @@ -2182,9 +2192,9 @@ static struct mdio_device_id __maybe_unused marvell_tbl[] = { { MARVELL_PHY_ID_88E1111, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1118, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1121R, MARVELL_PHY_ID_MASK }, - { MARVELL_PHY_ID_88E1145, MARVELL_PHY_ID_MASK }, - { MARVELL_PHY_ID_88E1149R, MARVELL_PHY_ID_MASK }, - { MARVELL_PHY_ID_88E1240, MARVELL_PHY_ID_MASK }, +/* { MARVELL_PHY_ID_88E1145, MARVELL_PHY_ID_MASK }, */ +/* { MARVELL_PHY_ID_88E1149R, MARVELL_PHY_ID_MASK }, */ +/* { MARVELL_PHY_ID_88E1240, MARVELL_PHY_ID_MASK }, */ { MARVELL_PHY_ID_88E1318S, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1116R, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1510, MARVELL_PHY_ID_MASK }, -- 2.30.2